package com.glela.serial.mapper;

import com.glela.serial.model.DiscoveryTypeVo;
import com.glela.serial.model.TitleDiscovery;
import com.glela.serial.model.response.ResponseTitleDiscoveryVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface TitleDiscoveryMapper {
//    int deleteByPrimaryKey(Integer id);

    int insert(TitleDiscovery record);

    int insertSelective(TitleDiscovery record);

    TitleDiscovery selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TitleDiscovery record);

    int updateByPrimaryKey(TitleDiscovery record);
    //创建时间倒序
	List<TitleDiscovery> queryAllDiscoveryPage(@Param("discoveryType")Byte type, @Param("startIndex")int startIndex, @Param("pageSize")Integer pageSize);
	//按照排序字段sort优先排序
	List<ResponseTitleDiscoveryVo> queryAllDiscoveryPageNew(@Param("discoveryType") Byte type, @Param("startIndex") int startIndex, @Param("pageSize") Integer pageSize, @Param("nowTime") String nowTime);

	List<DiscoveryTypeVo> findMaxIdsBytype();
    //查询指定商品的素材列表
    List<ResponseTitleDiscoveryVo> queryAllDiscoveryPageNewByGoodId(@Param("discoveryType") Byte type, @Param("goodId") Long goodId, @Param("startIndex") int startIndex, @Param("pageSize") Integer pageSize, @Param("nowTime")String nowTime);

    int updateDiscoveryCountByid(@Param("titleDiscoveryId")Integer titleDiscoveryId, @Param("type")Integer type);
    
}